package com.freeter.common.enums;

/**
 * ''0 未提交 1 待确认 2 已确认',
 */
public enum OrderStatusEnum {
    SUBMIT_STATUS("未提交",0), WAIT_CONFIRM_STATUS("待确认",1),CONFIRM_STATUS("已确认",2);

    private final String name;
    private final int code;

    OrderStatusEnum(String name, int code) {
        this.name = name;
        this.code = code;
    }
    public static String getName(int code){
        for( OrderStatusEnum st : OrderStatusEnum.values()){
            if(st.code == code){return st.name;}
        }
        return "";
    }
}
